function [C]=LogitCost(mu,p,gamma_g,gamma_b)

C=-1*(Hw(mu)+ Hw(1-mu)- p*(Hw(gamma_g)+Hw(1-gamma_g))-(1-p)*(Hw(gamma_b)+Hw(1-gamma_b)));
end

